import request from '@/axios/axios.js';

// 查询
export const searchApi = (params) => {
  return request({
    method: 'get',
    url: '/dms/material-type/list',
    params: params
  })
};

// 增加
export const addApi = (params) => {
  return request({
    method: 'post',
    url: '/dms/material-type/save',
    data: params
  })
};

// 根据ID或者名称查询分类信息
export const infoApi = (params) => {
  return request({
    method: 'get',
    url: '/dms/material-type/info',
    params: params
  })
};

// 修改
export const updateApi = (params) => {
  return request({
    method: 'put',
    url: '/dms/material-type/update',
    data: params
  })
};

// 删除
export const deleteApi = (params) => {
  return request({
    method: 'delete',
    url: '/dms/material-type/delete',
    data: params
  })
};

// 导出
export const exportApi = () => {
  return request({
    method: 'get',
    url: '/dms/material-type/export',
    responseType: 'blob'
  })
};


